Fix #14325 add originalTypeName to library ValueType-s#8028
Open
olabetskyi wants to merge 2 commits intodanmar:mainfrom
Open
Fix #14325 add originalTypeName to library ValueType-s#8028olabetskyi wants to merge 2 commits intodanmar:mainfrom
olabetskyi wants to merge 2 commits intodanmar:mainfrom
Conversation
danmar
reviewed
Dec 12, 2025
lib/symboldatabase.cpp
Outdated
| type = ValueType::Type::INT; | ||
| else | ||
| type = ValueType::Type::UNKNOWN_INT; | ||
| originalTypeName = typestr; |
Owner
There was a problem hiding this comment.
originalTypeName is already assigned above.
originalTypeName = "size_t";
I'm not sure there might be a reason to remove "std::". if we have some code that uses originalTypeName ..
|
danmar
reviewed
Dec 15, 2025
| else | ||
| type = ValueType::Type::UNKNOWN_INT; | ||
| sign = (podtype->sign == 'u') ? ValueType::UNSIGNED : ValueType::SIGNED; | ||
| if (originalTypeName.empty()) |
Owner
There was a problem hiding this comment.
I don't remember the exact context but can't typestr be something like "int". can it contain qualifiers and stars?
| "[test.cpp:3]: (warning) %Lf in format string (no. 6) requires 'long double' but the argument type is 'signed int'.\n", | ||
| "void foo() { printf(\"%d %ld %u %lu %f %Lf\", bar().i, bar().i, bar().i, bar().i, bar().i, bar().i); }", | ||
| dinit(CheckOptions, $.portability = true)); | ||
| ASSERT_EQUALS("[test.cpp:3]: (portability) %ld in format string (no. 2) requires 'long' but the argument type is 'int32_t {aka signed int}'.\n" |
Owner
There was a problem hiding this comment.
hmm.. this looks very unfortunate. If the type is wrong i.e. long/int then I would prefer "warning". Or if we see that there is UB I would even prefer "error".
How difficult is it to keep writing warnings?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.